package com.sdx.demo.entity;

import java.util.Date;
import javax.validation.constraints.NotNull;

import com.sdx.service.ConfigService;
import lombok.Data;
import org.beetl.sql.core.annotatoin.AutoID;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/* 
* 
* gen by Spring Boot2 Admin 2019-01-09
*/
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
@Data
public class DemoBase extends BaseEntity{

    //唯一id
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @AutoID	

    private Integer demoId ;
	
    //标题

    private String title ;
	
    //单选项
    @Dict(type="PAY_METHOD")

    private Integer singleSelect ;
	
    //多选项1

    private String mulSelect ;
	
    //文本

    private String longTxt ;
	
    //本地文件

    private String localFile ;
	
    //云文件

    private String cloudFile ;
	
    //图片

    private String cover ;
	
    //可用标记 1、可用，0、不可用

    private Integer demoStatus ;
	
    //创建人

    private Integer createdBy ;
	
    //创建人名称

    private String createdName ;
	
    //创建时间

    private Date createdTime ;
	
    //更新人

    private Integer updatedBy ;
	
    //更新人名称

    private String updatedName ;
	
    //更新时间

    private Date updatedTime ;
	

	public String getCoverView(){
		return ConfigService.fileUrl+cover;
	}
}
